package mytest.graph;

import java.util.Stack;

 

/**
 * @author chuc
 *
 */
public class MainGraph {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Graph theGraph = new Graph();
		theGraph.addVertex("A");
		theGraph.addVertex("B");
		theGraph.addVertex("C");
		theGraph.addVertex("D");
		theGraph.addVertex("E");
		theGraph.addVertex("G");
		theGraph.addEdge(0, 1);
		theGraph.addEdge(1, 2);
		theGraph.addEdge(0, 3);
		theGraph.addEdge(3, 4);
		theGraph.addEdge(2, 4);
		theGraph.addEdge(2, 5);
		
		
		System.out.println("Visits ----------");
		theGraph.dsf();
		System.out.println("------------------");
//        Stack<Integer> s = new Stack<Integer>(); 
//        for (int i = 0; i < 10; i++) { 
//                s.push(i); 
//        } 
//        //���ϱ���ʽ 
//        for (Integer x : s) { 
//                System.out.println(x); 
//        } 
//        System.out.println("------1-----"); 
//        //ջ�������ʽ 
////        while (s.peek()!=null) {     //����׳���жϷ�ʽ���������쳣����ȷд��������� 
//        while (!s.empty()) { 
//                System.out.println(s.pop()); 
//        } 
//        System.out.println("------2-----"); 
        //����ı���ʽ 
//        for (Integer x : s) { 
//                System.out.println(s.pop()); 
//        } 
        
		//		// TODO Auto-generated method stub
//        Queue<String> queue = new LinkedList<String>();
//        queue.offer("Hello");
//        queue.offer("World!");
//        queue.offer("��ã�");
////        queue.remove();
//        System.out.println(queue.size());
//        String str;
//        while((str=queue.poll())!=null){
//            System.out.print(str);
//        }
//        System.out.println();
//        System.out.println(queue.size());
		
		
	}

}

